<?php
namespace App\Http\Controllers\Admin\Job;

use App\Services\Admin\JobStaffService;
use App\Utilities\JiugeForm;
use Illuminate\Http\Request;

class StaffController extends BaseController
{
    /**
     * 岗位
     */

    protected $view = 'admin.job.staff.';//视图前缀
    protected $url = 'staff';//路由前缀
    protected $model;

    public function __construct()
    {
        parent::__construct();
        $this->prefix_url = $this->prefix_url.'/'.$this->url;
        $this->model = new JobStaffService();
        view()->share('prefix_url',$this->prefix_url);
        view()->share('jiugeForm',new JiugeForm($this->prefix_url));
    }

    public function index()
    {
        $models = $this->model->getIndex();
        return view($this->view.'index',array(
            'datas' => $models,
        ));
    }
}
